package com.huaxia;

import com.huaxia.util.MyCommentGenerator;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.StringHttpMessageConverter;

import java.nio.charset.Charset;

@SpringBootApplication
@MapperScan(value = "com.huaxia.dao")
public class XbgApplication {

	public static void main(String[] args) {
		SpringApplication.run(XbgApplication.class, args);
	}

	/***
	 *
	 *
	 * @Title 统一设置字符集 UTF-8
	 * @return
	 * @version: 1.0
	 * @author Michael.Zhang
	 * 修改历史:
	 * 修改人: Michael.Zhang, 修改日期 : 2018年05月11日 下午5:11:39
	 * 修改内容 :
	 */
	@Bean
	public HttpMessageConverter<String> responseBodyConverter() {
		StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
		return converter;
	}


}
